#include "case.h"

void Case::creerListe() {
    lid=glGenLists(1);
    glNewList(lid, GL_COMPILE);
    glBegin(GL_TRIANGLES);
        /*glNormal3d(8, 8, -1.1);
        glVertex3d(0.050029, 0.05003, -0.2);
        glVertex3d(0.05003, 1.949971, -0.2);
        glVertex3d(1.949971, 1.949971, -0.2);

        glNormal3d(8, 8, -1.1);
        glVertex3d(0.050029, 0.05003, -0.2);
        glVertex3d(1.949971, 1.949971, -0.2);
        glVertex3d(1.949971, 0.050029, -0.2);

        glNormal3d(8, 8, 0.9);
        glVertex3d(1.949971, 1.94997, 0);
        glVertex3d(0.050029, 1.949971, 0);
        glVertex3d(0.050029, 0.05003, 0);

        glNormal3d(8, 8, 0.9);
        glVertex3d(1.949971, 1.94997, 0);
        glVertex3d(0.050029, 0.05003, 0);
        glVertex3d(1.94997, 0.050029, 0);

        glNormal3d(7.105679, 8, -0.547425);
        glVertex3d(0.050029, 0.05003, -0.2);
        glVertex3d(0, 0, -0.1);
        glVertex3d(0, 2, -0.1);

        glNormal3d(7.105679, 8, -0.547425);
        glVertex3d(0.050029, 0.05003, -0.2);
        glVertex3d(0, 2, -0.1);
        glVertex3d(0.05003, 1.949971, -0.2);

        glNormal3d(8, 8.894323, -0.547421);
        glVertex3d(1.949971, 1.949971, -0.2);
        glVertex3d(0.05003, 1.949971, -0.2);
        glVertex3d(0, 2, -0.1);

        glNormal3d(8, 8.894323, -0.547421);
        glVertex3d(1.949971, 1.949971, -0.2);
        glVertex3d(0, 2, -0.1);
        glVertex3d(2, 2, -0.1);

        glNormal3d(8.894322, 8, -0.547423);
        glVertex3d(1.949971, 0.050029, -0.2);
        glVertex3d(1.949971, 1.949971, -0.2);
        glVertex3d(2, 2, -0.1);

        glNormal3d(8.894322, 8, -0.547423);
        glVertex3d(1.949971, 0.050029, -0.2);
        glVertex3d(2, 2, -0.1);
        glVertex3d(2, 0, -0.1);

        glNormal3d(8, 7.105679, -0.547425);
        glVertex3d(0, 0, -0.1);
        glVertex3d(0.050029, 0.05003, -0.2);
        glVertex3d(1.949971, 0.050029, -0.2);

        glNormal3d(8, 7.105679, -0.547425);
        glVertex3d(0, 0, -0.1);
        glVertex3d(1.949971, 0.050029, -0.2);
        glVertex3d(2, 0, -0.1);

        glNormal3d(8, 8.894321, 0.347425);
        glVertex3d(0.050029, 1.949971, 0);
        glVertex3d(1.949971, 1.94997, 0);
        glVertex3d(2, 2, -0.1);

        glNormal3d(8, 8.894321, 0.347425);
        glVertex3d(0.050029, 1.949971, 0);
        glVertex3d(2, 2, -0.1);
        glVertex3d(0, 2, -0.1);

        glNormal3d(7.105677, 8, 0.347421);
        glVertex3d(0.050029, 0.05003, 0);
        glVertex3d(0.050029, 1.949971, 0);
        glVertex3d(0, 2, -0.1);

        glNormal3d(7.105677, 8, 0.347421);
        glVertex3d(0.050029, 0.05003, 0);
        glVertex3d(0, 2, -0.1);
        glVertex3d(0, 0, -0.1);

        glNormal3d(8, 7.105678, 0.347423);
        glVertex3d(1.94997, 0.050029, 0);
        glVertex3d(0.050029, 0.05003, 0);
        glVertex3d(0, 0, -0.1);

        glNormal3d(8, 7.105678, 0.347423);
        glVertex3d(1.94997, 0.050029, 0);
        glVertex3d(0, 0, -0.1);
        glVertex3d(2, 0, -0.1);

        glNormal3d(8.894322, 8, 0.347423);
        glVertex3d(1.94997, 0.050029, 0);
        glVertex3d(2, 0, -0.1);
        glVertex3d(2, 2, -0.1);

        glNormal3d(8.894322, 8, 0.347423);
        glVertex3d(1.94997, 0.050029, 0);
        glVertex3d(2, 2, -0.1);
        glVertex3d(1.949971, 1.94997, 0);*/
        
        glNormal3d(8, 8, -1.1);
        glVertex3d(-0.949971, -0.94997, -0.2);
        glVertex3d(-0.94997, 0.949971, -0.2);
        glVertex3d(0.949971, 0.949971, -0.2);

        glNormal3d(8, 8, -1.1);
        glVertex3d(-0.949971, -0.94997, -0.2);
        glVertex3d(0.949971, 0.949971, -0.2);
        glVertex3d(0.949971, -0.949971, -0.2);

        glNormal3d(8, 8, 0.9);
        glVertex3d(0.949971, 0.94997, 0);
        glVertex3d(-0.949971, 0.949971, 0);
        glVertex3d(-0.949971, -0.94997, 0);

        glNormal3d(8, 8, 0.9);
        glVertex3d(0.949971, 0.94997, 0);
        glVertex3d(-0.949971, -0.94997, 0);
        glVertex3d(0.94997, -0.949971, 0);

        glNormal3d(7.105679, 8, -0.547425);
        glVertex3d(-0.949971, -0.94997, -0.2);
        glVertex3d(-1, -1, -0.1);
        glVertex3d(-1, 1, -0.1);

        glNormal3d(7.105679, 8, -0.547425);
        glVertex3d(-0.949971, -0.94997, -0.2);
        glVertex3d(-1, 1, -0.1);
        glVertex3d(-0.94997, 0.949971, -0.2);

        glNormal3d(8, 8.894323, -0.547421);
        glVertex3d(0.949971, 0.949971, -0.2);
        glVertex3d(-0.949971, 0.949971, -0.2);
        glVertex3d(-1, 1, -0.1);

        glNormal3d(8, 8.894323, -0.547421);
        glVertex3d(0.949971, 0.949971, -0.2);
        glVertex3d(-1, 1, -0.1);
        glVertex3d(1, 1, -0.1);

        glNormal3d(8.894322, 8, -0.547423);
        glVertex3d(0.949971, -0.949971, -0.2);
        glVertex3d(0.949971, 0.949971, -0.2);
        glVertex3d(1, 1, -0.1);

        glNormal3d(8.894322, 8, -0.547423);
        glVertex3d(0.949971, -0.949971, -0.2);
        glVertex3d(1, 1, -0.1);
        glVertex3d(1, -1, -0.1);

        glNormal3d(8, 7.105679, -0.547425);
        glVertex3d(-1, -1, -0.1);
        glVertex3d(-0.949971, -0.94997, -0.2);
        glVertex3d(0.949971, -0.949971, -0.2);

        glNormal3d(8, 7.105679, -0.547425);
        glVertex3d(-1, -1, -0.1);
        glVertex3d(0.949971, -0.949971, -0.2);
        glVertex3d(1, -1, -0.1);

        glNormal3d(8, 8.894321, 0.347425);
        glVertex3d(-0.949971, 0.949971, 0);
        glVertex3d(0.949971, 0.94997, 0);
        glVertex3d(1, 1, -0.1);

        glNormal3d(8, 8.894321, 0.347425);
        glVertex3d(-0.949971, 0.949971, 0);
        glVertex3d(1, 1, -0.1);
        glVertex3d(-1, 1, -0.1);

        glNormal3d(7.105677, 8, 0.347421);
        glVertex3d(-0.949971, -0.94997, 0);
        glVertex3d(-0.949971, 0.949971, 0);
        glVertex3d(-1, 1, -0.1);

        glNormal3d(7.105677, 8, 0.347421);
        glVertex3d(-0.949971, -0.94997, 0);
        glVertex3d(-1, 1, -0.1);
        glVertex3d(-1, -1, -0.1);

        glNormal3d(8, 7.105678, 0.347423);
        glVertex3d(0.94997, -0.949971, 0);
        glVertex3d(-0.949971, -0.94997, 0);
        glVertex3d(-1, -1, -0.1);

        glNormal3d(8, 7.105678, 0.347423);
        glVertex3d(0.94997, -0.949971, 0);
        glVertex3d(-1, -1, -0.1);
        glVertex3d(1, -1, -0.1);

        glNormal3d(8.894322, 8, 0.347423);
        glVertex3d(0.94997, -0.949971, 0);
        glVertex3d(1, -1, -0.1);
        glVertex3d(1, 1, -0.1);

        glNormal3d(8.894322, 8, 0.347423);
        glVertex3d(0.94997, -0.949971, 0);
        glVertex3d(1, 1, -0.1);
        glVertex3d(0.949971, 0.94997, 0);

    glEnd();
    glEndList();
}
